package com.jszc.lottery.common.datatest;
import java.net.URLEncoder;

;

public class ThridDataApi {

    private static  final String api="http://m.api.iuliao.com/home/base?";

    public static void main(String[] args) {
        footballLeagueList("1001","2");
    }

    /**
     * 足球列赛列表
     */
    public static  void footballLeagueList(String oid,String type){
        try {
            String[] postdata = {
                    "oid=" + URLEncoder.encode(oid, "UTF-8"),
                    "type=" + URLEncoder.encode(type, "UTF-8"),
            };
            String paramenter=  HttpClient.implode("&",postdata);  //封装参数
            String url=api+paramenter;
            String  result = HttpClient.http(url);    //接口返回数据
            CommuDic dic = JsonUtil.jsonToObj(CommuDic.class,result);
            BaseDataListResp resp = new BaseDataListResp();
            resp.setExtraData(dic);
            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }



}
